'''
/*
 * @Author: wevsmy 
 * @Date: 2017-10-30 17:18:02 
 * @Last Modified by: wevsmy
 * @Last Modified time: 2017-10-30 17:29:06
 */
'''
import time

def A():
    while True:
        print("----A---")
        yield
        time.sleep(0.5)

def B(c):
    while True:
        print("----B---")
        c.__next__()
        time.sleep(0.5)

if __name__=='__main__':
    a = A()
    B(a)
    